/****************************************************************************/
/* File: scs-clock.h                                                        */
/* Desc: Specification file for the core clock type                         */
/* Created: 2014-11-13                                                      */
/* Revised: 2014-11-13                                                      */
/* Authors: Sterling P. de Mille                                            */
/****************************************************************************/

// include once
#ifndef _SCS_ALARM_H_
#define _SCS_ALARM_H_

// core data types
#include "scs-types.h"
// core clock type
#include "scs-clock.h"

// core alarm type
class SCSalarm
{
protected:

	SCSfloat			m_fDeltaTime;
	SCSdouble		m_fElapsedTime;
	SCSbool 		m_iPaused;
	SCSdouble		m_fAlarmTime;
	SCSbool			m_iAlarmEnabled;
	SCSfloat 		m_fTimeScale;

public:

 	// constructors
	SCSalarm ();
 	 // destructor
 	~SCSalarm ();

	void Update ();
	void Reset ();

	void Start ();
	void Restart ();
	void Stop ();

	void Pause ();
	void Resume ();

	void SetTimeScale (SCSfloat fTimeScale);
	SCSfloat GetTimeScale ();

	void EnableAlarm (SCSbool iEnable);
	SCSbool AlarmEnabled ();
	void SetAlarmTime (SCSfloat fDays, SCSfloat fHours, SCSfloat fMinutes, SCSfloat fSeconds);
	void SetAlarmTime (SCSdouble fSeconds);
	SCSbool TimerDone ();

	SCSfloat GetDT ();

	SCSdouble GetRemainingTime ();
	SCSdouble GetElapsedTime ();
};

#endif // _SCS_ALARM_H_
